package com.epic.network;

public class NetworkEpic implements OnRequestMediaListener {
	// private final static URL = "epic.vn/api/bathu.php?limit=50&start=3";
	private static NetworkEpic instance;
	private boolean isRequesting;

	public static NetworkEpic getInstance() {
		if (null == instance) {
			instance = new NetworkEpic();
		}
		return instance;
	}

	public NetworkEpic() {
		isRequesting = false;
	}

	public void requestMedia(OnReceiverDataListener listener) {
		if (isRequesting)
			return;

		EpicLoader epicLoader = new EpicLoader(listener,this);
		epicLoader.execute();
		isRequesting = true;
	}

	@Override
	public void onRequestDone() {
		isRequesting = false;
	}
}
